package com.x.erp.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.x.erp.dao.CarTypeDao;
import com.x.erp.model.CarType;
import com.x.erp.rpc.CarTypeRpcService;
import com.x.framework.exception.BusinessException;
import com.x.framework.exception.ExceptionCode;
import com.x.framework.service.BaseService;

@Component
@Service(interfaceName = "com.x.erp.rpc.CarTypeRpcService", timeout = 60000)
public class CarTypeService extends BaseService implements CarTypeRpcService {
	@Autowired
	private CarTypeDao carTypeDao;

	/**
	 * 查询车辆类型
	 * @param carType
	 * @return
	 */
	@Override
	public List<CarType> selectCarTypeList(CarType carType) {
		try {
			return carTypeDao.selectCarTypeList(carType);
		} catch (Exception e) {
			throw new BusinessException(ExceptionCode.EXCEPTION_CODE0000, e);
		}
	}
}
